

using UnityEngine;
using UnityEngine.EventSystems;

public class UI_CraftSlot : UI_ItemSlot
{

    protected override void Start()
    {
        base.Start();
    }

    public void SetupCraftSlot(ItemData_Equip _data)
    {
        if (_data == null)
            return;

        item.itemData = _data;

        itemImage.sprite = _data.icon;
        itemText.text = _data.itemName;
    }

    private void OnEnable()
    {
        UpdateSlot(item);
    }

    public override void OnPointerDown(PointerEventData eventData)
    {
        //base.OnPointerDown(eventData);

        //ItemData_Equip craftData = item.itemData as ItemData_Equip;

        //Inventory.instance.CanCraft(craftData, craftData.craftingMat);
        ui.craftWindow.SetupCraftWindow(item.itemData as ItemData_Equip);

    }
}
